import request from '@/utils/request'
import store from '@/store'
let org_code = localStorage.getItem('org_code')
// 查询机构存储量统计
export function getStorStatic (params) {
	return request({
		url: '/Statistics/org-usage',
		method: 'get',
		params
	})
}

// 获取机构科室存储量统计
export function getEveryStatic (params) {
	return request({
		url: '/Domains/org-depart-usage',
		method: 'get',
		params
	})
}
// 获取存储域
export function getDomainStatic (params) {
	return request({
		url: `/Statistics/${org_code}/domin-usage`,
		method: 'get',
		params
	})
}

// 查询各科室检查数据
export function getDepartCount () {
	console.log(org_code)
	console.log(store)
	console.log('>>>>>')
	return request({
		// url: `/Statistics/${org_code}/depart-exam-count`,
		url: '/Statistics/' + org_code + '/depart-exam-count',
		method: 'get'
	})
}

/** 获取机构存储内容统计信息（机构管理） */
export function getStorageUsage (params) {
	return request({
		url: '/Statistics/typecode-storage-usage',
		method: 'get',
		params
	})
}

/** 获取机构存储内容统计信息（机构管理） */
export function getWaterData (params) {
	return request({
		url: `/Statistics/${org_code}/storage-usage`,
		method: 'get'
	})
}

// 调阅量统计
export function getReadList (params) {
	return request({
		url: '/supervise-service/OrganizationReadershipStatistic',
		method: 'get',
		params
	})
}

// 采集质量-机构管理
export function getCollQuality (params) {
	return request({
		url: '/Statistics/org-quality',
		method: 'get',
		params
	})
}

// 数据质量
export function getDataQuality (params) {
	return request({
		url: '/Statistics/org-data-quality',
		method: 'get',
		params
	})
}

// 数据调阅
export function getDoctorData (params) {
	return request({
		url: 'Statistics/org-readership',
		method: 'get',
		params
	})
}
// 患者调阅数据
export function getReadPatientData (params) {
	return request({
		url: 'Statistics/org-readership',
		method: 'get',
		params
	})
}

/**
 * 数据质量统计
 */
// 获取采集质量统计
export function get_efficiency (params) {
	return request({
		url: '/Statistics/collection-efficiency',
		method: 'get',
		params
	})
}

// 获取检查采集统计
export function get_exam (params) {
	return request({
		url: '/Statistics/exam-collection',
		method: 'get',
		params
	})
}

// 获取影像采集统计
export function get_image (params) {
	return request({
		url: '/Statistics/image-collection',
		method: 'get',
		params
	})
}

// 获取胶片采集统计
export function get_film (params) {
	return request({
		url: '/Statistics/film-collection',
		method: 'get',
		params
	})
}

// 获取影像校对采集统计
export function get_check (params) {
	return request({
		url: '/Statistics/image-check',
		method: 'get',
		params
	})
}
// 获取机构
export function get_depart_list (params) {
	return request({
		url: '/Statistics/department',
		method: 'get',
		params
	})
}
// 获取数据质量详情
export function get_data_quality_detail (params) {
	return request({
		url: '/Statistics/data-quality-detail',
		method: 'get',
		params
	})
}

// 获取影像校对详情
export function get_img_detail (params) {
	return request({
		url: '/Statistics/image-check-details',
		method: 'get',
		params
	})
}

// 获取检查详情
export function get_exam_detail (params) {
	return request({
		url: '/Statistics/exam-details',
		method: 'get',
		params
	})
}

// 获取影像详情
export function get_image_detail (params) {
	return request({
		url: '/Statistics/image-details',
		method: 'get',
		params
	})
}

// 获取胶片详情
export function get_film_detail (params) {
	return request({
		url: '/Statistics/film-details',
		method: 'get',
		params
	})
}
